from apps.libs.error_code import Success
from apps.libs.redprint import Redprint
from apps.libs.token_auth import auth
from apps.models.dance import Dance

api = Redprint('dance')

@api.route('/dancelist/', methods=['POST'])
@auth.login_required
def danceList():
    dance_list = Dance.query.all()
    resp = [{"id": dance.id, "name": dance.name, "logo": dance.logo, "type": dance.type, 'usable': dance.usable} for dance in dance_list]
    return Success(data=resp, msg='查询成功！')



